﻿using FluentFTP;
using System;
using System.Net;

namespace FTPLibrary
{
    public class FluentFTPManager
    {
        public void Use()
        {
            //ftp://ygdy8:ygdy8@yg90.dydytt.net:6047/[阳光电影www.ygdy8.com]星际迷航：发现号第二季第01集[中英双字].mkv"
            //ftp://ygdy8:ygdy8@yg45.dydytt.net:4207/阳光电影www.ygdy8.com.复仇者联盟4：终局之战.HD.720p.中英双字幕.mkv
            // create an FTP client
            FtpClient client = new FtpClient("yg90.dydytt.net", 6047, "ygdy8","ygdy8");
            // if you don't specify login credentials, we use the "anonymous" user account
            //client.Credentials = new NetworkCredential("ygdy8", "ygdy8");
            // begin connecting to the server
            client.Connect();

            // download the file again
            client.DownloadFile(@"C:\MyVideo_2.mp4", "/阳光电影www.ygdy8.com.复仇者联盟4：终局之战.HD.720p.中英双字幕.mkv");

            // disconnect! good bye!
            client.Disconnect();
        }
    }
}
